<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 全局变量
        var a = 1;

        function get_data(){
            // 获取全局变量
            console.log(a)

            // 定义局部变量
            var b = 3;
            console.log(b)

            // 对全局变量进行自增
            a++;
            console.log(a)

            console.log(a + b)
        }



        get_data()
    </script>
</head>
<body>
    
</body>
</html>
